package cn.com.weaver.services.webservices;

public class WorkflowServiceLocator extends lotus.domino.websvc.client.Service implements WorkflowService {

    public WorkflowServiceLocator() {
        super("WebservicesServicesWeaverComCnWorkflowService");
    }

    // Use to get a proxy class for WorkflowServiceHttpPort
    private final String WorkflowServiceHttpPort_address = "http://103.160.132.171:9080/services/WorkflowService";

    public String getWorkflowServiceHttpPortAddress() {
        return WorkflowServiceHttpPort_address;
    }

    // The WSDD service name defaults to the port name.
    private final String WorkflowServiceHttpPortWSDDServiceName = "WorkflowService.WorkflowServiceHttpPort";

    public WorkflowServicePortType getWorkflowServiceHttpPort() throws javax.xml.rpc.ServiceException {
       java.net.URL endpoint;
        try {
            endpoint = new java.net.URL(WorkflowServiceHttpPort_address);
        }
        catch (java.net.MalformedURLException e) {
            throw new javax.xml.rpc.ServiceException(e);
        }
        return getWorkflowServiceHttpPort(endpoint);
    }

    public WorkflowServicePortType getWorkflowServiceHttpPort(java.net.URL portAddress) throws javax.xml.rpc.ServiceException {
        try {
            WorkflowServiceHttpBindingStub _stub = new WorkflowServiceHttpBindingStub(portAddress, this);
            _stub.setPortName(WorkflowServiceHttpPortWSDDServiceName);
            return _stub;
        }
        catch (lotus.domino.types.Fault e) {
            return null;
        }
    }

    /**
     * For the given interface, get the stub implementation.
     * If this service has no port for the given interface,
     * then ServiceException is thrown.
     */
    public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {
        try {
            if (WorkflowServicePortType.class.isAssignableFrom(serviceEndpointInterface)) {
                WorkflowServiceHttpBindingStub _stub = new WorkflowServiceHttpBindingStub(new java.net.URL(WorkflowServiceHttpPort_address), this);
                _stub.setPortName(WorkflowServiceHttpPortWSDDServiceName);
                return _stub;
            }
        }
        catch (Throwable t) {
            throw new javax.xml.rpc.ServiceException(t);
        }
        throw new javax.xml.rpc.ServiceException("There is no stub implementation for the interface:  " + (serviceEndpointInterface == null ? "null" : serviceEndpointInterface.getName()));
    }

    /**
     * For the given interface, get the stub implementation.
     * If this service has no port for the given interface,
     * then ServiceException is thrown.
     */
    public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {
        if (portName == null) {
            return getPort(serviceEndpointInterface);
        }
        String inputPortName = portName.getLocalPart();
        if ("WorkflowServiceHttpPort".equals(inputPortName)) {
            return getWorkflowServiceHttpPort();
        }
        else  {
            java.rmi.Remote _stub = getPort(serviceEndpointInterface);
            ((lotus.domino.websvc.client.Stub) _stub).setPortName(portName);
            return _stub;
        }
    }

    public javax.xml.namespace.QName getServiceName() {
        return new javax.xml.namespace.QName("webservices.services.weaver.com.cn", "WorkflowService");
    }

    private java.util.HashSet ports = null;

    public java.util.Iterator getPorts() {
        if (ports == null) {
            ports = new java.util.HashSet();
            ports.add(new javax.xml.namespace.QName("WorkflowServiceHttpPort"));
        }
        return ports.iterator();
    }

}
